package com.zj.classwork;
import java.util.Scanner;
public class ClassWork11 {
    public static void main(String[] args) {
        Scanner input=new Scanner(System.in);
        System.out.println("请输入年份：");
        int year= input.nextInt();
        System.out.println("请输入月份：");
        int month= input.nextInt();
        System.out.println("请输入日期");
        int day= input.nextInt();
        int sum=0;

        for(int i=1;i<month;i++)
        {
            switch (i){
                case 1,3,5,7,8,10,12:
                    sum+=31;
                    break;
                case 2:
                    sum+=28;
                    break;
                case 4,6,9,11:
                    sum+=30;
                    break;
            }
        }
        sum+=day;
        if((year%4==0&&year%100!=0)||year%400==0)
        {
            sum+=1;
        }
        else{
            sum+=0;
        }
        System.out.println(month+"月"+day+"日是"+year+"年的第"+sum+"天");

    }
}
